# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.

import db
import numpy as np
import matplotlib.pylab as plt

def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'Hi, {name}')  # Press Ctrl+F8 to toggle the breakpoint.


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    print_hi('PyCharm')

    # 测试
    # print(len(db.init_course()))
    # print(len(db.init_students()))
    # print(len(db.init_classrooms()))
    # print(len(db.init_teachers()))
    # print(len(db.init_teaching_assignment()))

    start_state = np.zeros((5, 20));
    print(start_state);


    def step_function(x):
        return np.array(x > 0, dtype=np.int32)
    X = np.arange(-5.0, 5.0, 0.1)
    Y = step_function(X)
    plt.plot(X, Y)
    plt.ylim(-0.1, 1.1)  # 指定图中绘制的y轴的范围
    plt.show()

    print(np.array([1,-1]))

    grid_shape = (6, 7)
    print(grid_shape)

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
